import { DefaultLayout, ParentLayout } from '@/layout'
import type { Route } from '@/layout/components'

export default {
  path: '/recharge',
  name: 'Recharge',
  component: DefaultLayout,
  redirect: '/recharge/bynOrderManage',
  meta: {
    title: '话费电费',
    roles: ['话费电费'],
    icon: 'menu-recharge',
    sort: 6,
    alwaysShow: true
  },

  children: [
    {
      path: 'phone',
      name: 'Phone',
      component: ParentLayout,
      meta: { title: '话费管理', roles: ['话费管理'] },
      children: [
        {
          path: 'phoneGoodsManage',
          name: 'PhoneGoodsManage',
          component: () => import('@/views/recharge/phone/bynGoodsManage'),
          meta: { title: '商品管理', roles: ['话费商品管理'] }
        },
        {
          path: 'phoneOrderManage',
          name: 'PhoneOrderManage',
          component: () => import('@/views/recharge/phone/bynOrderManage'),
          meta: { title: '订单管理', roles: ['话费订单管理'] }
        }
      ]
    },
    {
      path: 'electric',
      name: 'Electric',
      component: ParentLayout,
      meta: { title: '电费管理', roles: ['电费管理'] },
      children: [
        {
          path: 'electricGoodsManage',
          name: 'ElectricGoodsManage',
          component: () => import('@/views/recharge/electric/bynGoodsManage'),
          meta: { title: '商品管理', roles: ['电费商品管理'] }
        },
        {
          path: 'electricOrderManage',
          name: 'ElectricOrderManage',
          component: () => import('@/views/recharge/electric/bynOrderManage'),
          meta: { title: '订单管理', roles: ['电费订单管理'] }
        }
      ]
    }
  ]
} as Route
